/*--------------------------------------------------------------------------------------------------
Yatak Operation System Project Copyright 2012-2013
Author : Ilya Churaev
Started : 29 Jan 2013		Updated : 3 Feb 2013
File Name : users.h			Purpose : Declarations for obtaining system time
--------------------------------------------------------------------------------------------------*/
#ifndef _USERS_H
#define _USERS_H

#ifdef __cplusplus
extern "C" {
#endif

#include <sched.h>

#define MAX_USERS 100

// List for login/logout users
struct ulist
{
	task_t * ret;
	struct ulist * next;
};

typedef struct ulist ulist_t;

int Enter_in_System ();
char * whoami ();
uid_t GetUserId ();
char * FindUserName (uid_t uid);
int login (char * user, char * passwd);
void logout ();
void init_user ();

int register_user (char * user, int uid);

void save_return_point (task_t * task);
task_t * get_return_point ();

#ifdef __cplusplus
}
#endif

#endif
